package com.zr.Inquiry.pojo;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.zr.utils.ErrorMessage;
import lombok.Data;

import javax.validation.Valid;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import java.util.Date;
import java.util.List;

/**
 * @ClassName InquiryAdd
 * @Description TODO
 * @Author xiaowei
 * @Date 2019/12/29 21:04
 * @Version 1.0
 */
@Data
public class InquiryAddandUpdateVo {
    private String requestForQuotationId;
    private Integer id;
    @NotNull(message = ErrorMessage.CURRENCYCODEISNOT)
    private Integer currencyCode;
    @NotNull(message = ErrorMessage.ISTAXISNOT)
    private Integer inquiryStatus;
    @NotNull(message = ErrorMessage.LEGALPERSONIDISNOT)
    private Integer legalPersonId;
    @NotNull(message = ErrorMessage.TYPEISNOT)
    private Integer type;
    @NotNull(message = ErrorMessage.ISTAXISNOT)
    private Integer isTax;
    @JsonFormat(pattern = "yyyy-MM-dd", timezone ="Asia/Shanghai" )
    private Date startTime;
    @JsonFormat (pattern = "yyyy-MM-dd", timezone = "Asia/Shanghai")
    private Date endTime;
    @Valid
    @NotEmpty(message = ErrorMessage.INQUIRYSPAREVOLISTISNOT)
    private List<InquirySpareVo> inquiryDetailsList;//备件
    @NotEmpty(message = ErrorMessage.INQUIRYSUPPLIERVOLISTISNOT)
    private List<InquirySupplierVo> supplierDetailsList;//供应商
}
